<template>
  <div>
    <!-- 3.实现tabbar组件，点击跳转对应路由 -->
    <van-tabbar v-model="props.index">
      <van-tabbar-item icon="home-o" to="/home">首页</van-tabbar-item>
      <van-tabbar-item icon="apps-o" to="/classify">分类</van-tabbar-item>
      <van-tabbar-item icon="shopping-cart-o" to="/cart"
        >购物车</van-tabbar-item
      >
      <van-tabbar-item icon="friends-o" to="/my">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>
<script setup>
import { defineProps } from "vue";
const props = defineProps(["index"]);
</script>
<style scoped>
</style>